package cn.gdgst.dao;

import java.util.Map;

import cn.gdgst.entity.PeiXun;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.database.Database;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import cn.gdgst.entity.ChuangKe;
import cn.gdgst.entity.ZiXun;
import cn.gdgst.entity.WenKu;
import cn.gdgst.entity.MingShi;
import cn.gdgst.entity.KaoShi;
import cn.gdgst.entity.HuiZhan;
import cn.gdgst.entity.ZhuangBei;
import cn.gdgst.entity.Video;
import cn.gdgst.entity.Science;
import cn.gdgst.entity.MidPhy;
import cn.gdgst.entity.MidBio;
import cn.gdgst.entity.MidChe;
import cn.gdgst.entity.Experiment;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig chuangKeDaoConfig;
    private final DaoConfig ziXunDaoConfig;
    private final DaoConfig wenKuDaoConfig;
    private final DaoConfig mingShiDaoConfig;
    private final DaoConfig peiXunDaoConfig;
    private final DaoConfig kaoShiDaoConfig;
    private final DaoConfig huiZhanDaoConfig;
    private final DaoConfig zhuangBeiDaoConfig;
    private final DaoConfig videoDaoConfig;
    private final DaoConfig scienceDaoConfig;
    private final DaoConfig midPhyDaoConfig;
    private final DaoConfig midBioDaoConfig;
    private final DaoConfig midCheDaoConfig;
    private final DaoConfig experimentDaoConfig;

    private final ChuangKeDao chuangKeDao;
    private final ZiXunDao ziXunDao;
    private final WenKuDao wenKuDao;
    private final MingShiDao mingShiDao;
    private final PeiXunDao peiXunDao;
    private final KaoShiDao kaoShiDao;
    private final HuiZhanDao huiZhanDao;
    private final ZhuangBeiDao zhuangBeiDao;
    private final VideoDao videoDao;
    private final ScienceDao scienceDao;
    private final MidPhyDao midPhyDao;
    private final MidBioDao midBioDao;
    private final MidCheDao midCheDao;
    private final ExperimentDao experimentDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        chuangKeDaoConfig = daoConfigMap.get(ChuangKeDao.class).clone();
        chuangKeDaoConfig.initIdentityScope(type);

        ziXunDaoConfig = daoConfigMap.get(ZiXunDao.class).clone();
        ziXunDaoConfig.initIdentityScope(type);

        wenKuDaoConfig = daoConfigMap.get(WenKuDao.class).clone();
        wenKuDaoConfig.initIdentityScope(type);

        mingShiDaoConfig = daoConfigMap.get(MingShiDao.class).clone();
        mingShiDaoConfig.initIdentityScope(type);

        peiXunDaoConfig = daoConfigMap.get(PeiXunDao.class).clone();
        peiXunDaoConfig.initIdentityScope(type);

        kaoShiDaoConfig = daoConfigMap.get(KaoShiDao.class).clone();
        kaoShiDaoConfig.initIdentityScope(type);

        huiZhanDaoConfig = daoConfigMap.get(HuiZhanDao.class).clone();
        huiZhanDaoConfig.initIdentityScope(type);

        zhuangBeiDaoConfig = daoConfigMap.get(ZhuangBeiDao.class).clone();
        zhuangBeiDaoConfig.initIdentityScope(type);

        videoDaoConfig = daoConfigMap.get(VideoDao.class).clone();
        videoDaoConfig.initIdentityScope(type);

        scienceDaoConfig = daoConfigMap.get(ScienceDao.class).clone();
        scienceDaoConfig.initIdentityScope(type);

        midPhyDaoConfig = daoConfigMap.get(MidPhyDao.class).clone();
        midPhyDaoConfig.initIdentityScope(type);

        midBioDaoConfig = daoConfigMap.get(MidBioDao.class).clone();
        midBioDaoConfig.initIdentityScope(type);

        midCheDaoConfig = daoConfigMap.get(MidCheDao.class).clone();
        midCheDaoConfig.initIdentityScope(type);

        experimentDaoConfig = daoConfigMap.get(ExperimentDao.class).clone();
        experimentDaoConfig.initIdentityScope(type);

        chuangKeDao = new ChuangKeDao(chuangKeDaoConfig, this);
        ziXunDao = new ZiXunDao(ziXunDaoConfig, this);
        wenKuDao = new WenKuDao(wenKuDaoConfig, this);
        mingShiDao = new MingShiDao(mingShiDaoConfig, this);
        peiXunDao = new PeiXunDao(peiXunDaoConfig, this);
        kaoShiDao = new KaoShiDao(kaoShiDaoConfig, this);
        huiZhanDao = new HuiZhanDao(huiZhanDaoConfig, this);
        zhuangBeiDao = new ZhuangBeiDao(zhuangBeiDaoConfig, this);
        videoDao = new VideoDao(videoDaoConfig, this);
        scienceDao = new ScienceDao(scienceDaoConfig, this);
        midPhyDao = new MidPhyDao(midPhyDaoConfig, this);
        midBioDao = new MidBioDao(midBioDaoConfig, this);
        midCheDao = new MidCheDao(midCheDaoConfig, this);
        experimentDao = new ExperimentDao(experimentDaoConfig, this);

        registerDao(ChuangKe.class, chuangKeDao);
        registerDao(ZiXun.class, ziXunDao);
        registerDao(WenKu.class, wenKuDao);
        registerDao(MingShi.class, mingShiDao);
        registerDao(PeiXun.class, peiXunDao);
        registerDao(KaoShi.class, kaoShiDao);
        registerDao(HuiZhan.class, huiZhanDao);
        registerDao(ZhuangBei.class, zhuangBeiDao);
        registerDao(Video.class, videoDao);
        registerDao(Science.class, scienceDao);
        registerDao(MidPhy.class, midPhyDao);
        registerDao(MidBio.class, midBioDao);
        registerDao(MidChe.class, midCheDao);
        registerDao(Experiment.class, experimentDao);
    }
    
    public void clear() {
        chuangKeDaoConfig.getIdentityScope().clear();
        ziXunDaoConfig.getIdentityScope().clear();
        wenKuDaoConfig.getIdentityScope().clear();
        mingShiDaoConfig.getIdentityScope().clear();
        peiXunDaoConfig.getIdentityScope().clear();
        kaoShiDaoConfig.getIdentityScope().clear();
        huiZhanDaoConfig.getIdentityScope().clear();
        zhuangBeiDaoConfig.getIdentityScope().clear();
        videoDaoConfig.getIdentityScope().clear();
        scienceDaoConfig.getIdentityScope().clear();
        midPhyDaoConfig.getIdentityScope().clear();
        midBioDaoConfig.getIdentityScope().clear();
        midCheDaoConfig.getIdentityScope().clear();
        experimentDaoConfig.getIdentityScope().clear();
    }

    public ChuangKeDao getChuangKeDao() {
        return chuangKeDao;
    }

    public ZiXunDao getZiXunDao() {
        return ziXunDao;
    }

    public WenKuDao getWenKuDao() {
        return wenKuDao;
    }

    public MingShiDao getMingShiDao() {
        return mingShiDao;
    }

    public PeiXunDao getPeiXunDao() {
        return peiXunDao;
    }

    public KaoShiDao getKaoShiDao() {
        return kaoShiDao;
    }

    public HuiZhanDao getHuiZhanDao() {
        return huiZhanDao;
    }

    public ZhuangBeiDao getZhuangBeiDao() {
        return zhuangBeiDao;
    }

    public VideoDao getVideoDao() {
        return videoDao;
    }

    public ScienceDao getScienceDao() {
        return scienceDao;
    }

    public MidPhyDao getMidPhyDao() {
        return midPhyDao;
    }

    public MidBioDao getMidBioDao() {
        return midBioDao;
    }

    public MidCheDao getMidCheDao() {
        return midCheDao;
    }

    public ExperimentDao getExperimentDao() {
        return experimentDao;
    }

}
